Disallow '<' and '>' in free external URIs; this is consistent
authorWil Mahan <wmahan@users.mediawiki.org>
Sat, 2 Oct 2004 21:33:06 +0000 (21:33 +0000)
committerWil Mahan <wmahan@users.mediawiki.org>
Sat, 2 Oct 2004 21:33:06 +0000 (21:33 +0000)
with RFC 2396 and fixes a parser test case. Remove the
INVERSE_EXT_LINK_URL_CLASS constant, which has never been used.

includes/Parser.php

index 7cb0ad1..8e3e8a4 100644 (file)
@@ -37,8 +37,7 @@ define( 'UNIQ_PREFIX', 'NaodW29');
 define( 'URL_PROTOCOLS', 'http|https|ftp|irc|gopher|news|mailto' );
 define( 'HTTP_PROTOCOLS', 'http|https' );
 # Everything except bracket, space, or control characters
-define( 'EXT_LINK_URL_CLASS', '[^]\\x00-\\x20\\x7F]' );
-define( 'INVERSE_EXT_LINK_URL_CLASS', '[\]\\x00-\\x20\\x7F]' );
+define( 'EXT_LINK_URL_CLASS', '[^]<>\\x00-\\x20\\x7F]' );
 # Including space
 define( 'EXT_LINK_TEXT_CLASS', '[^\]\\x00-\\x1F\\x7F]' );
 define( 'EXT_IMAGE_FNAME_CLASS', '[A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]' );